import sys


# str=sys.stdin.readline()
# print(str)

# num=input("请输入第一个数字")
# print(num)
#
# sys.stdout.write('Hello')
# print("world")


file=open('a.txt','r',buffering=1)
print(file.read())
file.close()

with open('a.txt','r',encoding='utf-8',buffering=1) as file2:
    # print(file2.read())
    # print(file2.read())
    print(file2.readlines())

with open('b.txt','w',encoding='utf-8',buffering=1) as file3:
    file3.write('hello world')